Website Data Sources
Website data sources, classified as unstructured data sources, allow you to extract and index content directly from web pages to power your AI Agent responses. By crawling public or authenticated websites, the system parses the HTML content, breaks it down into semantic paragraphs, and vectorizes it for Retrieval-Augmented Generation (RAG).
By default, the extractor excludes content from a standard set of HTML elements (such as headers or footers) to ensure data quality. You can customize this behavior and manage how web content is processed by navigating to Knowledge Base Settings > Advanced > HTML Settings. For more information, see HTML Settings.
Add Web Data to the Knowledge Base
To add content from a website, you must configure a website data source container that points to your target domain, then crawl and extract the data.
Step 1: Create the data source
To begin, follow the step-by-step instructions in Data Source Creation. In the Add New Data Source modal, make the following settings:
- From the Type dropdown, select Website.
- Leave the Crawl using HTTP requests option selected if you want Druid to retrieve data directly from your servers using HTTP requests. This method works best for websites that don’t rely on JavaScript to display content.
-
To crawl a password-protected website, disable the Crawl using HTTP requests option, then provide your credentials and authentication page URL (Login url) in the designated fields. Alternatively, you can enter this information later in the data source Details tab.
- Select Include subdomains if you want the Knowledge Base Engine to also retrieve data from subdomains of the provided URL.
- In the URL field, enter the website URL starting with https://. E.g. https://druidai.com.
- Click Create to save the data source.
The website data is added to the Knowledge Base and the data source page displays by default on the Extracted paragraphs tab, which will remain empty until you initiate the data ingestion.
Step 2. Configure Advanced Content Rendering (Optional)
If your website uses dynamic scripts, collapsible elements, or requires user authentication, you must configure additional settings before executing the crawl.
Crawling Dynamically Rendered Content (Playwright Scripts)
If your website renders content dynamically, you can provide a custom script to manipulate the page Document Object Model (DOM) after loading.
- On the data source page, click the Advanced Settings tab.
- In the HTML Post Render Script field, paste Playwright-compatible JavaScript.
- Save your changes.
This script runs directly in the headless browser after the page loads, ensuring all interactive elements (like expanding accordions or tab menus) are fully expanded and visible before Druid extracts the text.
Crawling Password-Protected Websites
To crawl a private portal or authenticated web environment:
- On the data source page, click the Details tab.
- Ensure the Crawl using HTTP requests option is cleared.
- Provide your secure user credentials and the authentication page URL (Login URL) in the designated fields.
- Save the changes.
If your website data source contains content that is rendered dynamically (for example, content displayed only after JavaScript execution such as drop-downs, tabs, or accordions), you can use a Playwright script to ensure all content is available for scraping.
Step 3. Execute the Website Crawl
User-agent: Elastic-Crawler
Allow:
Sitemap: <your website or web page goes here - e.g., https://www.druidai.com>
User-agent: druidai-kb
Allow:
Sitemap: <your website or web page goes here>To crawl the website, click Crawl at the top-right corner of the page. In the Start Crawling Parameters modal, define the crawling parameters outlined below:
| Parameter | Description |
|---|---|
| Depth |
Controls how far the system follows links from a page:
|
| Throttle | The crawling speed, that is, the minimum number of seconds to wait between 2 consecutive crawling requests. |
| Use Site Maps | Select if you want the crawler to use the site map. If the website you entered does not have a site map, do not select this option. |
| Follow Links | Select if you want the crawler to visit all the hyperlinks in the retrieved web pages identified on the specified URL. |
| Crawl linked documents |
Enable this option if you want the crawler to detect non-password-protected document assets available on the website. The crawler will identify only documents that match the file types supported by the KB Engine. IMPORTANT! The crawler extracts document content from files with a maximum size of 20MB. Files exceeding this limit will not be processed.
|
As the crawler visits the link provided in the URL field, it will identify all the hyperlinks in the retrieved web pages and will add them to the list of URLs to visit.
Once crawling is complete, the discovered site pages are loaded into the data source index in a simplified single-panel tree view by default, making it easier to browse.
You can exclude specific hyperlinks from the extraction process to prevent Druid from scraping unwanted sub-links.
Step 4. Exclude links from scraping (optional)
Before you start the extraction process, you can choose to exclude specific links from scraping. You can do this either:
- In bulk – by specifying multiple links at once.
- Manually – by excluding individual links one by one.
Exclude links from scraping in bulk
You can exclude multiple links from scraping in a website data source at once. This bulk exclusion option saves time by eliminating the need to remove links one by one.
To exclude links in bulk:
- Click the Details tab.
- In the Exclude from scraping area, turn on the Advanced editing toggle.
- Enter the links you want to exclude as a JSON array, with each link enclosed in quotation marks. Example:
["https://example.com/page1", "https://example.com/page2"] - Save the changes.
Manually exclude links from scraping
To manually exclude from scraping specific pages, click the dots next to the desired page and select Exclude. By excluding specific web pages, users can ensure that only relevant content is captured and added to the Knowledge Base.
The URLs excluded from scraping appear on the Details tab, in the Exclude from scraping area.
Step 5. Extract content
To extract the raw text content from the indexed pages, click Extract at the top-right corner of the page.
Step 6. Train the data source
After data extraction, it's crucial to train your data source. This ensures the KB Engine provides accurate responses to user queries. In the top right corner of the page, click Train.
Crawl External Domains
By default, Druid web crawler only crawls the domain specified in your initial website data source URL (and subdomains if selected). If your website contains links to other domains (external links), these domains will not be automatically crawled.
To include these external domains in your crawled data, you need to add them as separate website data sources.
To add a new website data source for an external domain:
- Navigate to the KB website data source you are currently working with.
- Click the Details tab.
- Scroll down to the External links section. Here you will see a list of domains linked from your primary website.
- Locate the domain for which you want to create a new data source and click the Add icon next to it.
- The Add new data source modal opens.
- Enter a descriptive Name for your new data source.
- Click Save.
Once saved, this new data source will be created, and you can then initiate the crawling process for it independently.
Troubleshoot missing crawled links
Website data sources provide clear error messages for links that were not successfully crawled, enabling you to swiftly pinpoint the underlying issues. This enhanced visibility helps you maintain the accuracy and completeness of your data sources.
To understand why specific links are missing from the data source:
- In the tree explorer, place the mouse over the page you know links were not crawled, click the Actions menu and select Page Info.
- In the Page Info page, click the Extracted links tab.
- Review the information provided for each link. Error messages will highlight the specific reasons why a link was not crawled.









